package org.jeecg.modules.monitoring.j_monitoring.service;

import com.alibaba.fastjson.JSONObject;
import org.jeecg.modules.monitoring.j_monitoring.entity.MGlComputingResource;
import org.jeecg.modules.monitoring.j_monitoring.entity.MStorageCage;
import org.jeecg.modules.monitoring.j_monitoring.entity.MGlStorageResources;
import com.baomidou.mybatisplus.extension.service.IService;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 存储设备(管理)
 * @Author: xiaoyq
 * @Date:   2023-01-12
 * @Version: V1.0
 */
public interface IMGlStorageResourcesService extends IService<MGlStorageResources> {

	/**
	 * 添加一对多
	 *
	 * @param mGlStorageResources
	 * @param mStorageCageList
	 */
	public void saveMain(MGlStorageResources mGlStorageResources,List<MStorageCage> mStorageCageList) ;

	/**
	 * 修改一对多
	 *
   * @param mGlStorageResources
   * @param mStorageCageList
	 */
	public void updateMain(MGlStorageResources mGlStorageResources,List<MStorageCage> mStorageCageList);

	/**
	 * 删除一对多
	 *
	 * @param id
	 */
	public void delMain (String id);

	/**
	 * 批量删除一对多
	 *
	 * @param idList
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	public String getIp(String id);

	public void edit(MGlStorageResources mGlStorageResources);

	/**
	 * 根据存储Id查询设备地图数据
	 * @param storageId
	 * @return
	 */
	JSONObject getDeviceMapById(String storageId);

	/**
	 * 根据光纤交换机获得存储信息
	 * @param uplinkOpticalSwitchId
	 * @return
	 */
    MGlStorageResources getBySwitchId(String uplinkOpticalSwitchId);


	@Override
	boolean saveBatch(Collection<MGlStorageResources> entityList, int batchSize);

	List analysis(MGlStorageResources storageResources);
}
